package com.guigu.guliorder.entity.dto;


import com.guigu.gulicommon.annotations.CheckEnumParam;
import com.guigu.gulicommon.constant.enumes.order.PayTypes;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

import static com.guigu.gulicommon.constant.CheckParametersConstant.*;

/**
 * 提交订单入参
 *
 * @author 陈俊杰
 * @version 1.0
 * @since 2024/8/15 19:25
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@AllArgsConstructor
@NoArgsConstructor
public class SubmitOrderDto {

//    /**
//     * 商品id
//     */
//    @NotNull(message = SKU_ID_CANNOT_BE_NULL)
//    private Long skuId;
//    /**
//     * 购买数量
//     */
//    @NotNull(message = SKU_PURCHASE_COUNT_CANNOT_BE_NULL)
//    @Range(min = SKU_PURCHASE_COUNT_MIN_VALUE,max=SKU_PURCHASE_COUNT_MAX_VALUE, message = SKU_PURCHASE_COUNT_OUT_OF_BOUNDS)
//    private Long count;
    /**
     * 订单防冲token
     */
    @NotBlank(message = ORDER_TOKEN_CANNOT_BE_NULL)
    private String orderToken;
    /**
     * 地址id
     */
    @NotNull(message = ADDRESS_ID_CANNOT_BE_NULL)
    private Long addressId;
    /**
     * 支付方式
     */
    @CheckEnumParam(enumClass = PayTypes.class, tag = PAY_TYPES_CHINESE)
    private PayTypes payType;
    /**
     * 订单备注
     */
    private String remark;
}
